<?php

if(!empty($_POST))
{
	$file = upload($_FILES['file']);
	$waterstr = $_POST['text'];
	$size = $_POST['text_size'];
	$watertext = waterstr($file,$waterstr,$size);
	$_POST['file'] = $watertext;
	$re = insert('watertext', $_POST);
	if($re)
	{
		echo '添加成功';
		header('Refresh:1;index.php?a=admin&b=watertext&c=index');
		die;
	}
	else
	{
		echo '添加失败';
		header('Refresh:1;index.php?a=admin&b=watertext&c=add');
		die;
	}	
}




include('app/admin/watertext/html/add.html');
?>